$(function(){
	$('#signIn').on('click',adminLogin);
});

//用户登录
function adminLogin(){
	var adminName = $('#adminName').val();
	var password = $('#adminPassword').val();
	var returnUrl = $('#returnUrl').val();
	
	$.ajax({
		type : "POST",
		url : "/loginAdmin/loginCheck",
		async : false,
		data : {
			adminName : adminName,
			password : password 
		},
		dataType: 'json',
		success:function(data){
			if(data.isSuccess == "ok") {
				//登录成功，表单提交
				$("#loginForm").submit();
			}else {
				BSTYUN.dialog.warn("<span style='color:#000;'>"+data.isSuccess+"</span>");
			}
		}
	});
}
/**
 * 敲击回车键提交表单
 */
function keyLogin(){
	if(event.keyCode == 13){
		adminLogin();
	}
}





